<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "t_quiz_paper_ques_relation".
 *
 * @property string $id 主键
 * @property string $ques_id 问题id
 * @property string $paper_id 试卷id
 * @property string $ques_status 状态（未确认/已确认）
 * @property int $weight 权重
 * @property int $sequence 排序
 * @property double $score 分值
 * @property string $ques_type 题目类型
 * @property string $create_by
 * @property string $create_time
 * @property string $update_by
 * @property string $update_time
 * @property int $del_flag
 */
class TQuizPaperQuesRelation extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 't_quiz_paper_ques_relation';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['id'], 'required'],
            [['weight', 'sequence', 'del_flag'], 'integer'],
            [['score'], 'number'],
            [['create_time', 'update_time'], 'safe'],
            [['id', 'ques_id', 'paper_id', 'create_by', 'update_by','old_id'], 'string', 'max' => 36],
            [['ques_status', 'ques_type'], 'string', 'max' => 64],
            [['id'], 'unique'],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'ques_id' => 'Ques ID',
            'paper_id' => 'Paper ID',
            'ques_status' => 'Ques Status',
            'weight' => 'Weight',
            'sequence' => 'Sequence',
            'score' => 'Score',
            'ques_type' => 'Ques Type',
            'create_by' => 'Create By',
            'create_time' => 'Create Time',
            'update_by' => 'Update By',
            'update_time' => 'Update Time',
            'del_flag' => 'Del Flag',
            'old_id' => 'Old Id',
        ];
    }
}
